import 'package:flutter/material.dart';

extension NumRadius on num {
  BorderRadius get circular {
    return BorderRadius.circular(toDouble());
  }

  BorderRadius only({
    bool topLeft = false,
    bool topRight = false,
    bool bottomLeft = false,
    bool bottomRight = false,
  }) {
    return BorderRadius.only(
      topLeft: topLeft ? Radius.circular(toDouble()) : Radius.zero,
      topRight: topRight ? Radius.circular(toDouble()) : Radius.zero,
      bottomLeft: bottomLeft ? Radius.circular(toDouble()) : Radius.zero,
      bottomRight: bottomRight ? Radius.circular(toDouble()) : Radius.zero,
    );
  }
}
